﻿{extend name="public:layer_new_page_base"}
{block name="content"}
<!-- /.aside -->
<section id="content">
    <section class="vbox">
        <section class="scrollable padder">
            {include file="public:mylocal" /}
            <section class="panel panel-default">
                {include file="public:table_form_header" /}
                <div class="panel-body">
                    <form id="ajaxform_close" class="form-horizontal" method="post">
                        <div class="form-group" >
                            <label class="col-sm-2 control-label">所属栏目</label>
                            <div class="col-sm-10">
                                <select name="series_id" class="form-control" style="width: 160px">
                                    {volist  name="series" id="vo"}
                                    <option value="{$vo.id}"  {if condition="$list.pid==$vo.id"}selected{/if} >{$vo.title}</option>
                                    {/volist}
                                 <select/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">封面标题</label>
                            <div class="col-sm-10">
                                <input type="text" name="head" value="{$list.head}" maxlength="128" class="form-control" required>
                            </div>
                        </div>

                        <div class="panel-body">
                            <label class="col-sm-2 control-label">封面图片</label>
                            <div class="col-sm-8">
                                <input type="file" accept="image/*"  class="filestyle" name="head_img"  data-icon="false" data-classButton="btn btn-default" data-classInput="form-control inline input-s">
                                <img src="{$list.head_img}" alt="" width="40px">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">内容详情</label>
                            <div class="col-sm-10">
                                <script id="container" name="text" type="text/plain" style="min-height: 400px;">
                                            {$list.text|raw}
                                </script>
                            </div>
                        </div>
                        <div class="line line-dashed line-lg pull-in"></div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否显示</label>
                            <div class="col-sm-10">
                                <label class="switch">
                                    <input type="checkbox" {if ( $list.is_show == 1)} checked value="1" {else/} value="0" {/if} >
                                    <span></span>
                                </label>
                            </div>
                        </div>

                        <div class="line line-dashed line-lg pull-in"></div>


                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="reset"  class="btn btn-default" style="padding:6px 12px;font-size: 14px;">重 置</button>
                                <button type="submit" class="btn btn-primary" style="padding:6px 12px;font-size: 14px;">保 存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </section>
        </section>
    </section>
</section>
<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/console/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/console/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container');

</script>

<script type="text/javascript">
    setInterval(function() {
        var imgs = document.getElementById("ueditor_0").contentWindow.document.getElementsByTagName("img");
        var num = imgs.length;
        for (var i = 0; i <= num; i++) {
            imgs[i].style.maxWidth = '800px';
        }
    },1000);
</script>

{/block}
{/extend}
